import request from "@/utils/request";
export function getcategoryone(id) {
  return request({
    method: 'get',
    url: `admin/product/getCategory1`,
  })
}

export function getcategorytwo(id) {
  return request({
    method: 'get',
    url: `admin/product/getCategory2/${id}`,
  })
}

export function getcategorythree(id) {
  return request({
    method: 'get',
    url: `admin/product/getCategory3/${id}`,
  })
}

export function getattrInfoList(category1Id, category2Id, category3Id) {
  return request({
    url: `admin/product/attrInfoList/${category1Id}/${category2Id}/${category3Id}`
  })
}// 添加或修改属性
export function addOrUpdateAttrAPI(data) {
  return request({
    method: 'post',
    url: 'admin/product/saveAttrInfo',
    data
  })
}
export function dltAttr(attrId){
  return request({
    method: 'DELETE',
    url:`admin/product/deleteAttr/${attrId}`
  })
}
